{% extends "admin/layout.html" %}
{% macro form_group(name, comment) -%}
        <div class="form-group">
            <label for="{{ name }}">{{ comment }}</label>
            <input type="text" class="form-control" id="{{ name }}" name="{{ name }}" value="{{ userInfo[name] }}">
        </div>
{%- endmacro %}

{% block myStyle %}
  <link href="/static/css/dashboard.css" rel="stylesheet">
  <script>
        function changepic() {
            var reads = new FileReader();
            f = document.getElementById('file').files[0];
            reads.readAsDataURL(f);
            reads.onload = function(e) {
            document.getElementById('pic').src = this.result;
            };
           }
  </script>
{% endblock %}

{% block content %}
<div class="x_content">
    <!-- <h2>图书详情</h2>
    <hr/> -->
    <div class="col-md-7 col-sm-7 col-xs-12" style="border:0px solid #e5e5e5;">
    <form action="/admin/user/modify?id={{ userInfo['id'] }}" method="POST">
        {{ form_group('username', '用户名') }}
        {{ form_group('nickname', '昵称') }}
        {{ form_group('email', '邮箱') }}
        {{ form_group('phone', '电话') }}
        {{ form_group('passwd', '密码') }}
        <button type="submit" class="btn btn-primary">保存用户</button>
    </form>
    </div>
    
</div>
{% endblock %}
